package com.example.lianguisystem.mapperLianGui;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.lianguisystem.VO.DailyCapacityVO;
import com.example.lianguisystem.VO.ListLabelDataVO;
import com.example.lianguisystem.entity.LianGuiIdCardRecord;
import com.example.lianguisystem.entity.LianGuiLabelRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Set;

@Mapper
public interface LabelMapper extends BaseMapper<LianGuiLabelRecord> {
    String selectSeqByPrimarkKey(@Param("printDate") String printDate);

    Integer insertIntoTable(@Param("record") LianGuiLabelRecord lianGuiLabelRecord);

    List<LianGuiLabelRecord> listByProdName(@Param("currentPage") Integer currentPage, @Param("pageSize") Integer pageSize,
                                            @Param("prodName") String prodName);

    List<Map<String, Object>> listOfClient();

    List<Map<String, String>> listOfWarehouse();

    Integer selectCountByProdName(@Param("prodName") String prodName);

    LianGuiLabelRecord selectByLabel(@Param("label") String label);
    DailyCapacityVO selectByLabelOfDaily(@Param("label") String label);
    LianGuiLabelRecord selectByLabelId(@Param("id") String id);

    Integer selectLabelStatus(@Param("label") String label,@Param("status") Integer status);
    Integer selectLabelStatusOfThree(@Param("label") String label);

    Integer selectMaxSeq(@Param("pre") String pre);

    Map<String, Object> selectWarehouse(@Param("code") String code);

    Map<String, Object> selectClient(@Param("code") String code);

    Map<String, Object> selectProd(@Param("code") String code);

    Map<String, Object> selectPriceByProd(@Param("unitid") Integer unitid, @Param("date") String date
            , @Param("storeid") Integer storeid, @Param("goodsid") Integer goodsid, @Param("traderid") Integer traderid
            , @Param("moneyid") Integer moneyid, @Param("shopid") Integer shopid);

    Integer selectMaxSaleKey();

    //    Integer insertIntoSale(@Param("sSale") SSale sSale);
//    Integer insertIntoSSalechild(@Param("sSalechild") SSalechild sSalechild);
//    Integer insertIntoSSaledetail(@Param("sSaledetail") SSaledetail sSaledetail);
    Integer execup_ab_billprint_insert(@Param("billid") Integer billid, @Param("billCode") String billCode
            , @Param("data") String data, @Param("opid") Integer opid, @Param("shopid") Integer shopid);


    Map<String, String> selectLoginUsername(@Param("account") String account, @Param("password") String password);

    String selectIsHasAccount(@Param("account") String account);


    String selectYuanGongBianHao(@Param("username") String usernmae);


    String selectMaxSerialNum();

    Boolean selectIsSubmit(@Param("list") List<String> list);
    Set<String> selectIsExist(@Param("list") List<String> list);

    List<LianGuiLabelRecord> selectLabelData(@Param("item") ListLabelDataVO listLabelDataVO);

    Map<String, Object> selectUserData(@Param("username") String username);


    List<Map<String, Object>> selectDetailData(@Param("list") List<String> idList);

    List<LianGuiIdCardRecord> listHasIdCard();

    LianGuiLabelRecord selectPreLabelData(@Param("username") String username);
    LianGuiLabelRecord selectChangeLabelData(@Param("label") String label);

    Integer selectBillByLabel(@Param("label") String label);

    List<LianGuiLabelRecord> selectCollectData(@Param("billid") Integer billid);

    Integer updateUpdateBy(@Param("id") String id);

    LianGuiLabelRecord selectLabelDataBySoBillCode(@Param("billcode") String billcode);

    List<Map<String, String>> listSoBillCodeOfSelection();

    Boolean isOverweight(@Param("billcode") String billcode);

    Map<String, Object> selectCurrentWeight(@Param("id") String id);

    String selectWorkshop(@Param("soBillcode") String soBillcode);

    List<LianGuiLabelRecord> selectLianGuiLabelById(@Param("list") List<String> id);


    String selectIsHasNewLabelId(@Param("label") String label);
}
